<?php

use app\common\middleware\AllowCrossDomain;
use think\facade\Route;

Route::group(':version', function () {
    Route::get('index', ':version.Index/index');
    Route::post('login', ':version.Index/login');
    Route::post('logout', ':version.Index/logout');
    Route::post('clearCache', ':version.Index/clearCache');

    //菜单
    Route::get('list', ':version.Menu/list');
    Route::any('edit', ':version.Menu/edit');
    Route::post('add', ':version.Menu/add');
    Route::delete('del', ':version.Menu/del');

    //用户
     Route::get('user/list', ':version.User/index');
     Route::any('user/edit', ':version.User/edit');
     Route::post('user/add', ':version.User/add');
     Route::delete('user/del', ':version.User/del');
    //客户申请
     Route::get('customer/list', ':version.Customer/index');
     Route::any('customer/edit', ':version.Customer/edit');
     Route::post('customer/add', ':version.Customer/add');
     Route::delete('customer/del', ':version.Customer/del');
     Route::get('customer/detail', ':version.Customer/detail');
     Route::post('customer/handle-customer', ':version.Customer/handleCustomer');


      //订阅配置
      Route::get('subscribe/list', ':version.Subscribe/index');
      Route::any('subscribe/edit', ':version.Subscribe/edit');
      Route::post('subscribe/add', ':version.Subscribe/add');
      Route::delete('subscribe/del', ':version.Subscribe/del');

     
    //角色组
    Route::get('group/list', ':version.Group/index');
    Route::post('group/add', ':version.Group/add');
    Route::any('group/edit', ':version.Group/edit');
    Route::delete('group/del', ':version.Group/del');
    //用户组
    Route::get('admin/list', ':version.Admin/index');
    Route::post('admin/add', ':version.Admin/add');
    Route::any('admin/edit', ':version.Admin/edit');
    Route::delete('admin/del', ':version.Admin/del');
    //图片
    Route::post('image/upload-image', ':version.Image/uploadImg');
    Route::post('image/qn-upload', ':version.Image/uploadSign');
    Route::get('image/im_download', ':version.Image/downloadFile');

    //附件
    Route::get('attachment/list', ':version.Attachment/index');
    //操作日志
    Route::get('adminLog/list', ':version.AdminLog/index');
    Route::delete('adminLog/del', ':version.adminLog/del');
    //系统配置
    Route::get('config/index', ':version.Config/index');
    Route::post('config/add', ':version.Config/add');
    Route::any('config/edit', ':version.Config/edit');
    Route::delete('config/del', ':version.Config/del');
    //个人资料
    Route::get('admin_info/index', ':version.AdminInfo/index');
    Route::any('admin_info/edit', ':version.AdminInfo/edit');
    //素材管理
    Route::get('annex/list', ':version.Attachment/index');
    Route::any('annex/edit', ':version.Attachment/edit');
    Route::delete('annex/del', ':version.Attachment/del');

    //隐私协议
    Route::get('privacy/list', ':version.PrivacyAgreementCon/index');
    Route::post('privacy/add', ':version.PrivacyAgreementCon/add');
    Route::any('privacy/edit', ':version.PrivacyAgreementCon/edit');
    Route::delete('privacy/del', ':version.PrivacyAgreementCon/del');



    //产品
    Route::get('product/list', ':version.Product/index');
    Route::any('product/add', ':version.Product/add');
    Route::any('product/edit', ':version.Product/edit');
    Route::delete('product/del', ':version.Product/del');
    Route::any('product/field', ':version.Product/fieldFun');
    //产品套餐
    Route::get('combo/list', ':version.ProductCombo/index');
    Route::any('combo/add', ':version.ProductCombo/add');
    Route::any('combo/edit', ':version.ProductCombo/edit');
    Route::delete('combo/del', ':version.ProductCombo/del');


    //消息
    Route::get('message/list', ':version.MessageCon/index');
    Route::any('message/add', ':version.MessageCon/add');
    Route::any('message/edit', ':version.MessageCon/edit');
    Route::delete('message/del', ':version.MessageCon/del');


    //消息类型
    Route::get('message_class/list', ':version.MessageClassCon/index');
    Route::any('message_class/add', ':version.MessageClassCon/add');
    Route::any('message_class/edit', ':version.MessageClassCon/edit');
    Route::delete('message_class/del', ':version.MessageClassCon/del');

     //常见问题
     Route::get('question/list', ':version.QuestionCon/index');
     Route::any('question/add', ':version.QuestionCon/add');
     Route::any('question/edit', ':version.QuestionCon/edit');
     Route::delete('question/del', ':version.QuestionCon/del');
     //类型
     Route::get('question_class/list', ':version.QuestionClassCon/index');
     Route::any('question_class/add', ':version.QuestionClassCon/add');
     Route::any('question_class/edit', ':version.QuestionClassCon/edit');
     Route::delete('question_class/del', ':version.QuestionClassCon/del');

    //发票管理
    Route::get('invoice/list', ':version.InvoiceCon/index');
    Route::get('invoice/detail', ':version.InvoiceCon/invoiveDetail');
    Route::post('invoice/invoive-send-email', ':version.InvoiceCon/invoiveSendEmail');

    //统计用户信息
    Route::get('user/user-statistics', ':version.User/userStatistics');
    //订单
    Route::get('order/list', ':version.OrderCon/index');
    //订单统计
    Route::get('order/info', ':version.OrderCon/info');
    //订单详情
    Route::get('order/detail', ':version.OrderCon/detail');
    //页面设置
    Route::group('page', function () {
        //金刚区设置
        Route::get('nav/list', ':version.pageConfig.Nav/index');
        Route::any('nav/add', ':version.pageConfig.Nav/add');
        Route::any('nav/edit', ':version.pageConfig.Nav/edit');
        Route::delete('nav/del', ':version.pageConfig.Nav/del');
        Route::get('nav/category', ':version.pageConfig.Nav/storeCategoryList');

        //底部导航
        Route::get('footer/list', ':version.pageConfig.FooterNavCon/index');
        Route::any('footer/add', ':version.pageConfig.FooterNavCon/add');
        Route::any('footer/edit', ':version.pageConfig.FooterNavCon/edit');
        Route::delete('footer/del', ':version.pageConfig.FooterNavCon/del');
        Route::get('footer/category', ':version.pageConfig.FooterNavCon/storeCategoryList');

        //轮播图设置
        Route::get('banner/list', ':version.pageConfig.banner/index');
        Route::any('banner/add', ':version.pageConfig.banner/add');
        Route::any('banner/edit', ':version.pageConfig.banner/edit');
        Route::delete('banner/del', ':version.pageConfig.banner/del');


        Route::get('video/list', ':version.pageConfig.video/index');
        Route::any('video/add', ':version.pageConfig.video/add');
        Route::any('video/edit', ':version.pageConfig.video/edit');
        Route::delete('video/del', ':version.pageConfig.video/del');


        //专家设置
        Route::get('expert/list', ':version.pageConfig.ExpertCon/index');
        Route::any('expert/add', ':version.pageConfig.ExpertCon/add');
        Route::any('expert/edit', ':version.pageConfig.ExpertCon/edit');
        Route::delete('expert/del', ':version.pageConfig.ExpertCon/del');

        //热门搜索
        Route::get('search/list', ':version.pageConfig.HotSearch/index');
        Route::any('search/add', ':version.pageConfig.HotSearch/add');
        Route::any('search/edit', ':version.pageConfig.HotSearch/edit');
        Route::delete('search/del', ':version.pageConfig.HotSearch/del');


        //自定义Tabbar
        Route::get('tabbar/list', ':version.pageConfig.CustomTabbar/index');
        Route::any('tabbar/add', ':version.pageConfig.CustomTabbar/add');
        Route::any('tabbar/edit', ':version.pageConfig.CustomTabbar/edit');
        Route::delete('tabbar/del', ':version.pageConfig.CustomTabbar/del');


        //充值金额
        Route::get('recharge/list', ':version.RechargeCon/index');
        Route::any('recharge/add', ':version.RechargeCon/add');
        Route::any('recharge/edit', ':version.RechargeCon/edit');
        Route::delete('recharge/del', ':version.RechargeCon/del');

        //充值订单
        Route::get('order/list', ':version.OrderCon/index');
        Route::any('order/add', ':version.OrderCon/add');
        Route::any('order/edit', ':version.OrderCon/edit');
        Route::delete('order/del', ':version.OrderCon/del');
        //vip设置
        Route::get('vip/list', ':version.pageConfig.UserVip/index');
        Route::any('vip/add', ':version.pageConfig.UserVip/add');
        Route::any('vip/edit', ':version.pageConfig.UserVip/edit');
        Route::delete('vip/del', ':version.pageConfig.UserVip/del');
        //vip设置
        Route::get('vip_money/list', ':version.pageConfig.VipMoeny/index');
        Route::any('vip_money/add', ':version.pageConfig.VipMoeny/add');
        Route::any('vip_money/edit', ':version.pageConfig.VipMoeny/edit');
        Route::delete('vip_money/del', ':version.pageConfig.VipMoeny/del');
        //vip设置
        Route::get('vip_day/list', ':version.pageConfig.VipDay/index');
        Route::any('vip_day/add', ':version.pageConfig.VipDay/add');
        Route::any('vip_day/edit', ':version.pageConfig.VipDay/edit');
        Route::delete('vip_day/del', ':version.pageConfig.VipDay/del');
        //下载币设置
        Route::get('coin/list', ':version.pageConfig.Coin/index');
        Route::any('coin/add', ':version.pageConfig.Coin/add');
        Route::any('coin/edit', ':version.pageConfig.Coin/edit');
        Route::delete('coin/del', ':version.pageConfig.Coin/del');
    });
    //文章
    Route::group('article', function () {
        //文章
        Route::get('notice/list', ':version.notice.Index/index');
        Route::any('notice/add', ':version.notice.Index/add');
        Route::any('notice/edit', ':version.notice.Index/edit');
        Route::delete('notice/del', ':version.notice.Index/del');

        //文章类型
        Route::get('type/list', ':version.notice.Type/index');
        Route::any('type/add', ':version.notice.Type/add');
        Route::any('type/edit', ':version.notice.Type/edit');
        Route::delete('type/del', ':version.notice.Type/del');
    });

    //直播
    Route::group('live', function () {
        //文章
        Route::get('list/list', ':version.LiveCon/index');
        Route::any('list/add', ':version.LiveCon/add');
        Route::any('list/edit', ':version.LiveCon/edit');
        Route::delete('list/del', ':version.LiveCon/del');
    });
})->middleware(AllowCrossDomain::class);
